<template>
	<view>
		<!-- :style="'height: '+(deviceInfo.screenHeight)+'px;'" -->
		<view class="bingli">
			<view class="bingli-hd">
				<view class="bingli-hd-left">
					病历编号:
				</view>
				<view class="bingli-hd-right">
					<!-- {{val.nr}} -->
					<input type="text" value="" v-model="form.idcard" />
				</view>
			</view>
			<view class="bingli-hd">
				<view class="bingli-hd-left">
					就诊日期:
				</view>
				<view class="bingli-hd-right">
					<!-- {{val.nr}} -->
					<input type="text" value="" />
				</view>
			</view>
			<view class="bingli-hd">
				<view class="bingli-hd-left">
					科室:
				</view>
				<view class="bingli-hd-right">
					<!-- {{val.nr}} -->
					<input type="text" value="" v-model="form.keshi" />
				</view>
			</view>
			<view class="bingli-hd">
				<view class="bingli-hd-left">
					门诊号:
				</view>
				<view class="bingli-hd-right">
					<!-- {{val.nr}} -->
					<input type="text" value="" v-model="form.menzhenhao" />
				</view>
			</view>
			<view class="bingli-hd">
				<view class="bingli-hd-left">
					就诊号:
				</view>
				<view class="bingli-hd-right">
					<!-- {{val.nr}} -->
					<input type="text" value="" v-model="form.jiuzhenhao" />
				</view>
			</view>
			<view class="bingli-hd">
				<view class="bingli-hd-left">
					患者姓名:
				</view>
				<view class="bingli-hd-right">
					<!-- {{val.nr}} -->
					<input type="text" value="" v-model="form.huanzhename" />
				</view>
			</view>
			<view class="bingli-hd">
				<view class="bingli-hd-left">
					联系电话:
				</view>
				<view class="bingli-hd-right">
					<!-- {{val.nr}} -->
					<input type="text" value="" v-model="form.huangzhedianhua" />
				</view>
			</view>
			<view class="bingli-nr-yi">
				<view class="bingli-nr-left">
					<view class="bingli-nr-left-lf">
						性别：
					</view>
					<view class="bingli-nr-left-rh">
						<input type="text" v-model="form.sex">
					</view>
				</view>
				<view class="bingli-nr-left">
					<view class="bingli-nr-left-lf">
						年龄：
					</view>
					<view class="bingli-nr-left-rh">
						<input type="text" v-model="form.age">
					</view>
				</view>
				<view class="bingli-nr-left">
					<view class="bingli-nr-left-lf">
						婚否：
					</view>
					<view class="bingli-nr-left-rh">
						<input type="text" v-model="form.ismarry">
					</view>
				</view>
			</view>
			<!-- 	<view class="bingli-nr">
				<view class="bingli-nr-left">
					<view class="bingli-nr-left-lf">
						患者姓名：
					</view>
					<view class="bingli-nr-left-rh">
						<input type="text" v-model="form.huanzhename">
					</view>
				</view>
				<view class="bingli-nr-left">
					<view class="bingli-nr-left-lf">
						联系电话：
					</view>
					<view class="bingli-nr-left-rh">
						<input type="text" v-model="form.huangzhedianhua">
					</view>
				</view>
			</view> -->
			<view class="bingli-nr">
				<view class="bingli-nr-left">
					<view class="bingli-nr-left-lf">
						身高：
					</view>
					<view class="bingli-nr-left-rh">
						<input type="text" v-model="form.shengao">
					</view>
				</view>
				<view class="bingli-nr-left">
					<view class="bingli-nr-left-lf">
						体重：
					</view>
					<view class="bingli-nr-left-rh">
						<input type="text" v-model="form.tizhong">
					</view>
				</view>
			</view>


			<view class="bingli-db">
				<view class="bingli-db-hd">
					患者过敏史:
				</view>
				<view class="bingli-db-db">
					<textarea name="" id="" cols="30" rows="10" v-model="form.guoming"></textarea>
				</view>
			</view>
			<view class="bingli-db">
				<view class="bingli-db-hd">
					患者病史:
				</view>
				<view class="bingli-db-db">
					<textarea name="" id="" cols="30" rows="10" v-model="form.binghistory"></textarea>
				</view>
			</view>
			<view class="bingli-db">
				<view class="bingli-db-hd">
					患者主诉病情:
				</view>
				<view class="bingli-db-db">
					<textarea name="" id="" cols="30" rows="10" v-model="form.huangzhezhusubingqing"></textarea>
				</view>
			</view>
			<view class="bingli-db">
				<view class="bingli-db-hd">
					临床(初步)诊断:
				</view>
				<view class="bingli-db-db">
					<textarea name="" id="" cols="30" rows="10" v-model="form.linchuang"></textarea>
				</view>
			</view>
			<view class="bingli-nr">
				<view class="bingli-nr-left">
					<view class="bingli-nr-left-lf">
						就诊医生：
					</view>
					<view class="bingli-nr-left-rh">
						<input type="text" v-model="form.yishengname">
					</view>
				</view>
				<view class="bingli-nr-left">
					<view class="bingli-nr-left-lf">
						业务审核：
					</view>
					<view class="bingli-nr-left-rh">
						<input type="text" v-model="form.yewushenhe">
					</view>
				</view>

			</view>
			<!-- <view class="bingli-hd">
				<view class="bingli-hd-left">
					打印时间:
				</view>
				<view class="bingli-hd-right">
					<input type="text" value="" v-model="form.dayintime" />
				</view>
			</view> -->
		</view>
		<!-- <view class="di  main" v-show="name">
			<button class="btn  btn-big" hover-class="btn-hor" @click="fashou()">发送</button>
		</view> -->
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	export default {
		data() {
			return {
				id: '',
				type: '',
				// btn_url:'/pages_manage/huli/chapi/chapi',
				form: {},
				toid: '',
				type: '',
			};
		},
		onLoad(id) {
			this.id = id.id
			console.log(this.id);
			this.name = id.name
			this.toid = id.toid
			this.type = id.type
			this.location = id.wz
			console.log(this.name);
			this.getList()
		},
		methods: {
			fashou() {
				// type 1文字 2语音 3图片 4视频 5病历 6处方 7申购 8采购 9入库 10出库 11申领 12请款  13请款收据 14借款 15借款收据 16报销 17请假
				console.log(this.toid, this.id, this.name, uni.getStorageSync('name'), uni.getStorageSync('ID'));
				let msg = {
					"code": "2",
					"message": {
						"toId": this.toid,
						"name": uni.getStorageSync('name'),
						"avatar": "profile/2023/02/22/20230222105702A001.png",
						"type": 5,
						"fromId": uni.getStorageSync('ID'),
						"content": this.id,
						"second": '',
						"taskId": "taskId",
						"second": "",
						"createTime": this.nowTime,
						"messageId": "1628231595821391872",
						"messageType": 0,
						"nameId": 1,
						"qunNmae": this.name,
						"weizhi": this.location,
					}
				}
				this.$ws.send(JSON.stringify(msg))
				uni.navigateBack({
					delta: 2
				});
			},
			getList() {
				this.request({
					url: '/richangjingying/selectBingLiById?Id=' + this.id,
				}).then(res => {
					console.log(res, 666);
					this.form = res.data
				})
			}
		},
		computed: {
			...mapState({
				deviceInfo: state => state.deviceInfo,
			})
		},
	}
</script>

<style lang="less">
	.bingli {
		background-color: #f5f5f5;
		height: 100%;
		// padding-bottom: 140rpx;

		.bingli-hd {
			display: flex;
			align-items: center;
			line-height: 80rpx;
			background-color: #fff;
			font-size: 30rpx;
			margin-bottom: 10rpx;

			.bingli-hd-left {
				// border-right: 5px solid #f5f5f5;
				padding: 0 20rpx;
			}

			.bingli-hd-right {
				// text-align: center;
				flex-grow: 1;
			}
		}

		.bingli-nr {
			display: flex;
			align-items: center;
			line-height: 70rpx;
			padding: 0 20rpx;
			box-sizing: border-box;
			background-color: #fff;
			border-bottom: 10rpx solid #f5f5f5;

			.bingli-nr-left {
				width: 50%;
				display: flex;
				align-items: center;

				.bingli-nr-left-rh {
					input {
						width: 170rpx;
					}

					width: 170rpx;
				}
			}

		}

		.bingli-nr-yi {
			display: flex;
			align-items: center;
			line-height: 70rpx;
			padding: 0 20rpx;
			box-sizing: border-box;
			background-color: #fff;
			border-bottom: 10rpx solid #f5f5f5;

			.bingli-nr-left {
				width: 34%;
				display: flex;
				align-items: center;

				.bingli-nr-left-rh {
					input {
						width: 120rpx;
					}

					width: 120rpx;
				}
			}
		}

		.bingli-db {
			padding: 20rpx;
			background-color: #fff;
			font-size: 30rpx;
			margin-bottom: 10rpx;
			line-height: 70rpx;

			.bingli-db-db {
				text-align: center;

				textarea {
					width: 100%;
					height: 150rpx;
				}
			}
		}

		.fashou {
			background-color: chocolate;
			text-align: center;
			line-height: 100rpx;
			color: #fff;
		}
	}
</style>
